<template>
  <div>
    <el-breadcrumb separator="/">
      <el-breadcrumb-item>热映电影</el-breadcrumb-item>
      <el-breadcrumb-item>电影列表</el-breadcrumb-item>
    </el-breadcrumb>
    <Buju :list="list" />
  </div>
</template>

<script>
import { getmovielist } from "@/api";
import { mapState, mapMutations } from "vuex";
import Buju from "@/components/buju.vue";
export default {
  components: {
    Buju,
  },
  data() {
    return {
      // list: [],
    };
  },
  computed: {
    ...mapState(["list"]),
  },
  methods: {
    ...mapMutations(["changeList"]),
  },
  mounted() {
    // getmovielist().then((res) => {
    //   this.list = res.result;
    // });
    if (!this.list) {
      getmovielist().then((res) => {
        // this.list = res.result;
        if(res.type){
          this.changeList(res.result);
        }
      });
    }
  },
};
</script>

<style lang="scss" scoped>
::-webkit-scrollbar {
  width: 0px;
}
::v-deep .el-breadcrumb__inner {
  color: rgb(240, 124, 124) !important;
}
.el-breadcrumb {
  font-size: 30px;
}
</style>